package a.j;

import a.c.d;
import a.c.m;
import a.c.q;
import a.c.z;
import a.d.w;
import a.f.zc;
import a.j.a.b;

import java.awt.*;
import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.util.*;
import java.util.List;

public abstract class ld
  implements zc
{
  private static final Color a = new Color(204, 204, 255);
  public static final byte b = 0;
  public static final byte c = 1;
  public static final byte d = 2;
  public static final byte e = 3;
  public static final byte f = 4;
  public static final byte g = 5;
  public static final byte h = 6;
  public static final byte i = 7;
  public static final byte j = 8;
  private Color k;
  private Color l;
  private Color m;
  private c o;
  private boolean p;
  private boolean q;
  private boolean r;
  private ArrayList s;
  private List t;
  private Map u;
  private byte v;
  private static Color w = Color.lightGray;
  private static Color x = Color.gray;
  protected double y;
  protected double z;
  protected double A;
  protected double B;
  a.c.e C;
  public static boolean D;
  public static boolean E;
  
  public ld()
  {
    this(0.0D, 0.0D, "");
  }
  
  public ld(double paramDouble1, double paramDouble2)
  {
    this(paramDouble1, paramDouble2, "");
  }
  
  public ld(double paramDouble1, double paramDouble2, String paramString)
  {
    this.l = a;
    this.p = false;
    this.r = true;
    this.m = Color.black;
    this.o = c.e;
    this.A = 30.0D;
    this.B = 30.0D;
    this.y = (paramDouble1 - this.A / 2.0D);
    this.z = (paramDouble2 - this.B / 2.0D);
    this.s = new ArrayList(1);
    a(paramString);
    this.v = 0;
  }
  
  void a(String paramString)
  {
    jg localjg = v();
    localjg.a(paramString);
    a(localjg);
  }
  
  public ld(ld paramld)
  {
    this.l = paramld.l;
    this.k = paramld.k;
    this.p = paramld.p;
    this.m = paramld.m;
    this.A = paramld.A;
    this.B = paramld.B;
    this.y = paramld.y;
    this.z = paramld.z;
    this.o = paramld.o;
    this.r = paramld.r;
    int n = paramld.y();
    if (!bool2)
    {
      if (n > 0)
      {
        this.t = new ArrayList(n);
        this.u = new HashMap();
      }
    }
    else
    {
      Iterator localIterator = paramld.z();
      do
      {
        if (!localIterator.hasNext()) {
          break;
        }
        jd localjd1 = (jd)localIterator.next();
        jd localjd2 = localjd1.a();
        c(localjd2);
        if ((!bool2) && (bool1)) {
          break label203;
        }
        this.u.put(localjd2, paramld.e(localjd1));
      } while (!bool1);
    }
    label203:
    int i1 = paramld.x();
    this.s = new ArrayList(i1);
    int i2 = 0;
    if (i2 < i1) {}
    do
    {
      b((jg)paramld.b(i2).clone());
      i2++;
      if ((!bool2) && (bool1)) {
        return;
      }
      if (!bool1) {
        break;
      }
      this.q = paramld.H();
    } while (bool2);
    this.v = 0;
  }
  
  public ld m()
  {
    return a(this);
  }
  
  public abstract ld a(ld paramld);
  
  public a.c.e n()
  {
    return this.C;
  }
  
  public void a(Color paramColor)
  {
    this.l = paramColor;
  }
  
  public Color o()
  {
    return this.l;
  }
  
  public void b(Color paramColor)
  {
    this.k = paramColor;
  }
  
  public Color p()
  {
    return this.k;
  }
  
  public void c(Color paramColor)
  {
    this.m = paramColor;
  }
  
  public Color q()
  {
    return this.m;
  }
  
  public void a(c paramc)
  {
    this.o = paramc;
  }
  
  public c r()
  {
    return this.o;
  }
  
  public void c(boolean paramBoolean)
  {
    this.p = paramBoolean;
  }
  
  public boolean s()
  {
    return this.p;
  }
  
  public void b(String paramString)
  {
    w().a(paramString);
  }
  
  public void t()
  {
    a.c.e locale = n();
    if ((E) || (locale != null))
    {
      q localq = locale.g();
      if ((localq instanceof g))
      {
        Rectangle2D.Double localDouble = new Rectangle2D.Double(0.0D, 0.0D, -1.0D, -1.0D);
        b(localDouble);
        ((g)localq).b(localDouble.x, localDouble.y, localDouble.width, localDouble.height);
      }
    }
  }
  
  public String u()
  {
    return w().H();
  }
  
  public jg v()
  {
    return new jg();
  }
  
  public void a(jg paramjg)
  {
    if (this.s.size() == 0) {
      this.s.add(paramjg);
    } else {
      this.s.set(0, paramjg);
    }
    paramjg.a(this);
  }
  
  public void b(jg paramjg)
  {
    this.s.add(paramjg);
    paramjg.a(this);
  }
  
  public void c(jg paramjg)
  {
    this.s.remove(paramjg);
  }
  
  public void a(int paramInt)
  {
    try
    {
      this.s.remove(paramInt);
    }
    catch (IndexOutOfBoundsException localIndexOutOfBoundsException)
    {
      throw new IndexOutOfBoundsException("Index: " + paramInt + ", Size: " + this.s.size());
    }
  }
  
  public jg w()
  {
    if (x() == 0) {
      b(v());
    }
    return (jg)this.s.get(0);
  }
  
  public jg b(int paramInt)
  {
    return (jg)this.s.get(paramInt);
  }
  
  public int x()
  {
    return this.s.size();
  }
  
  public jd c(int paramInt)
  {
    if (!E) {
      if (this.t == null) {
        throw new IndexOutOfBoundsException("Index: " + paramInt + ", Size: 0");
      }
    }
    return (jd)this.t.get(paramInt);
  }
  
  public void a(jd paramjd)
  {
    if (paramjd == null) {
      throw new IllegalArgumentException("null");
    }
    if (this.t == null)
    {
      this.t = new ArrayList(1);
      this.u = new HashMap();
    }
    if (!this.u.containsKey(paramjd))
    {
      c(paramjd);
      this.u.put(paramjd, new Object());
    }
  }
  
  private void c(jd paramjd)
  {
    this.t.add(paramjd);
    paramjd.a(this);
  }
  
  public void d(jd paramjd)
  {
    if (paramjd == null) {
      throw new IllegalArgumentException("null");
    }
    if ((E) || (this.t != null))
    {
      int n = this.t.indexOf(paramjd);
      if (n > -1) {
        e(n);
      }
    }
  }
  
  public void d(int paramInt)
  {
    if (this.t == null) {
      throw new IndexOutOfBoundsException("Index: " + paramInt + ", Size: 0");
    }
    if (paramInt < this.t.size()) {
      e(paramInt);
    }
  }
  
  private void e(int paramInt)
  {
    boolean bool2 = E;
    boolean bool1 = D;
    jd localjd = (jd)this.t.remove(paramInt);
    Object localObject = this.u.remove(localjd);
    a.c.e locale = n();
    if ((bool2) || (locale != null))
    {
      g localg;
      m localm;
      tb localtb;
      if (!bool2)
      {
        if (locale.d() > 0)
        {
          localg = S();
          localm = locale.m();
          do
          {
            if (!localm.e()) {
              break;
            }
            localtb = localg.t(localm.a());
            if (bool1) {
              break label193;
            }
            if (localObject == localtb.i) {
              localtb.Q();
            }
            localm.f();
          } while (!bool1);
        }
        if (bool2) {
          break label218;
        }
      }
      if (locale.e() > 0)
      {
        localg = S();
        localm = locale.n();
        label193:
        do
        {
          if (!localm.e()) {
            break;
          }
          localtb = localg.t(localm.a());
          if (bool1) {
            return;
          }
          if (localObject == localtb.h) {
            localtb.Q();
          }
          localm.f();
        } while (!bool1);
      }
    }
    if (!bool2) {
      label218:
      localjd.a(null);
    }
  }
  
  public int y()
  {
    return this.t == null ? 0 : this.t.size();
  }
  
  Iterator z()
  {
    return this.t == null ? Collections.EMPTY_LIST.iterator() : this.t.iterator();
  }
  
  Object e(jd paramjd)
  {
    return this.u == null ? null : this.u.get(paramjd);
  }
  
  jd a(Object paramObject)
  {
    boolean bool = E;
    if ((paramObject != null) && ((bool) || (this.u != null)) && ((bool) || (!this.u.isEmpty())))
    {
      Iterator localIterator = this.u.entrySet().iterator();
      while (localIterator.hasNext())
      {
        Map.Entry localEntry = (Map.Entry)localIterator.next();
        if (paramObject == localEntry.getValue()) {
          return (jd)localEntry.getKey();
        }
      }
    }
    return null;
  }
  
  public double A()
  {
    return this.y + this.A / 2.0D;
  }
  
  public double B()
  {
    return this.z + this.B / 2.0D;
  }
  
  public void c(double paramDouble1, double paramDouble2)
  {
    this.y = (paramDouble1 - this.A / 2.0D);
    this.z = (paramDouble2 - this.B / 2.0D);
    R();
    C();
  }
  
  public void a(double paramDouble)
  {
    c(paramDouble, B());
  }
  
  public void b(double paramDouble)
  {
    c(A(), paramDouble);
  }
  
  public double a()
  {
    return this.y;
  }
  
  public double b()
  {
    return this.z;
  }
  
  public void a(double paramDouble1, double paramDouble2)
  {
    if ((this.y == paramDouble1) && (this.z == paramDouble2)) {
      return;
    }
    this.y = paramDouble1;
    this.z = paramDouble2;
    R();
    C();
  }
  
  public void c(double paramDouble)
  {
    a(paramDouble, this.z);
  }
  
  public void d(double paramDouble)
  {
    a(this.y, paramDouble);
  }
  
  public void d(double paramDouble1, double paramDouble2)
  {
    this.y += paramDouble1;
    this.z += paramDouble2;
    R();
    C();
  }
  
  public double c()
  {
    return this.A;
  }
  
  public double d()
  {
    return this.B;
  }
  
  public void a(double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4)
  {
    b(paramDouble3, paramDouble4);
    a(paramDouble1, paramDouble2);
  }
  
  public void a(Rectangle2D paramRectangle2D)
  {
    b(paramRectangle2D.getWidth(), paramRectangle2D.getHeight());
    a(paramRectangle2D.getX(), paramRectangle2D.getY());
  }
  
  public void b(double paramDouble1, double paramDouble2)
  {
    boolean bool2 = E;
    boolean bool1 = D;
    double d1 = (this.A - paramDouble1) / 2.0D;
    double d2 = (this.B - paramDouble2) / 2.0D;
    this.y += d1;
    this.z += d2;
    this.A = paramDouble1;
    this.B = paramDouble2;
    int n = 0;
    if (n < this.s.size()) {}
    do
    {
      b(n).p();
      n++;
      if ((!bool2) && (bool1)) {
        return;
      }
      if (!bool1) {
        break;
      }
      R();
      Q();
    } while (bool2);
    C();
  }
  
  protected void C() {}
  
  protected void d(jg paramjg) {}
  
  public void e(double paramDouble)
  {
    b(paramDouble, this.B);
  }
  
  public void f(double paramDouble)
  {
    b(this.A, paramDouble);
  }
  
  public void d(boolean paramBoolean)
  {
    this.r = paramBoolean;
  }
  
  public boolean D()
  {
    return this.r;
  }
  
  public void a(byte paramByte)
  {
    this.v = paramByte;
  }
  
  public byte F()
  {
    return this.v;
  }
  
  public void a(byte paramByte, boolean paramBoolean)
  {
    boolean bool2 = E;
    boolean bool1 = D;
    if (paramBoolean)
    {
      if (bool2) {
        break label99;
      }
      if (n() != null)
      {
        g localg = (g)n().g();
        m localm = n().l();
        do
        {
          if (!localm.e()) {
            break;
          }
          localg.t(localm.a()).a(paramByte);
          localm.f();
          if ((!bool2) && (bool1)) {
            return;
          }
        } while (!bool1);
      }
    }
    if (!bool2) {
      label99:
      a(paramByte);
    }
  }
  
  public void e(boolean paramBoolean)
  {
    if (paramBoolean != this.q)
    {
      this.q = paramBoolean;
      g localg = S();
      if ((E) || (localg != null)) {
        localg.k(n());
      }
      G();
    }
  }
  
  void G() {}
  
  public boolean H()
  {
    return this.q;
  }
  
  public static void d(Color paramColor)
  {
    w = paramColor;
  }
  
  public static Color I()
  {
    return w;
  }
  
  public static void e(Color paramColor)
  {
    x = paramColor;
  }
  
  public static Color J()
  {
    return x;
  }
  
  public b K()
  {
    if ((E) || ((this instanceof b))) {
      return (b)this;
    }
    return null;
  }
  
  public qe L()
  {
    if ((E) || ((this instanceof qe))) {
      return (qe)this;
    }
    return null;
  }
  
  public ed M()
  {
    if ((E) || ((this instanceof ed))) {
      return (ed)this;
    }
    return null;
  }
  
  public Rectangle2D.Double O()
  {
    return new Rectangle2D.Double(this.y, this.z, this.A, this.B);
  }
  
  public byte e(double paramDouble1, double paramDouble2)
  {
    boolean bool = E;
    if (!bool) {
      if (!H()) {
        return 8;
      }
    }
    if (!bool) {
      if (paramDouble1 >= this.y - 6.0D)
      {
        if (bool) {
          break label104;
        }
        if (paramDouble1 <= this.y + this.A + 7.0D)
        {
          if (bool) {
            break label104;
          }
          if (paramDouble2 >= this.z - 6.0D)
          {
            if (bool) {
              break label111;
            }
            if (paramDouble2 <= this.z + this.B + 7.0D) {
              break label105;
            }
          }
        }
      }
    }
    label104:
    return 8;
    label105:
    label111:
    if (!bool) {
      if (paramDouble1 >= this.y)
      {
        if (bool) {
          break label185;
        }
        if (paramDouble1 <= this.y + this.A)
        {
          if (bool) {
            break label185;
          }
          if (paramDouble2 >= this.z)
          {
            if (bool) {
              break label185;
            }
            if (paramDouble2 <= this.z + this.B) {
              return 8;
            }
          }
        }
      }
    }
    label185:
    if (!bool) {
      if (paramDouble1 > this.y + this.A)
      {
        if (!bool) {
          if (paramDouble2 < this.z) {
            return 2;
          }
        }
        if (!bool) {
          if (paramDouble2 > this.z + this.B) {
            return 5;
          }
        }
        if (bool) {
          break label488;
        }
        if (paramDouble2 < this.z + this.B / 2.0D - 3.0D) {
          break label486;
        }
        if (bool) {
          break label488;
        }
        if (paramDouble2 >= this.z + this.B / 2.0D + 3.0D) {
          break label486;
        }
        return 7;
      }
    }
    if (!bool) {
      if (paramDouble1 < this.y)
      {
        if (!bool) {
          if (paramDouble2 < this.z) {
            return 0;
          }
        }
        if (!bool) {
          if (paramDouble2 > this.z + this.B) {
            return 3;
          }
        }
        if (bool) {
          break label488;
        }
        if (paramDouble2 < this.z + this.B / 2.0D - 3.0D) {
          break label486;
        }
        if (bool) {
          break label488;
        }
        if (paramDouble2 >= this.z + this.B / 2.0D + 3.0D) {
          break label486;
        }
        return 6;
      }
    }
    if (!bool) {
      if (paramDouble1 > this.y + this.A / 2.0D - 3.0D)
      {
        if (bool) {
          break label488;
        }
        if (paramDouble1 < this.y + this.A / 2.0D + 3.0D)
        {
          if (!bool) {
            if (paramDouble2 > this.z + this.B) {
              return 4;
            }
          }
          if (bool) {
            break label488;
          }
          if (paramDouble2 < this.z) {
            return 1;
          }
        }
      }
    }
    label486:
    label488:
    return 8;
  }
  
  public boolean a(double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4, Point2D paramPoint2D)
  {
    boolean bool2 = E;
    boolean bool1 = D;
    if (!bool2) {
      if (A() == paramDouble1)
      {
        if (bool2) {
          break label46;
        }
        if (B() == paramDouble2) {
          break label40;
        }
      }
    }
    return false;
    label40:
    label46:
    double d1 = paramDouble3 - A();
    double d2 = paramDouble4 - B();
    if (!bool2)
    {
      if (this.B >= 1.0E-006D)
      {
        if (bool2) {
          break label122;
        }
        if (this.A >= 1.0E-006D) {}
      }
      else
      {
        paramPoint2D.setLocation(A(), B());
      }
    }
    else
    {
      if (bool2) {
        break label315;
      }
      if (!bool1) {
        break label314;
      }
    }
    if (!bool2) {
      if (d2 > 0.0D)
      {
        label122:
        d5 = 1.0D;
        if (bool2) {
          break label150;
        }
        if (!bool1) {
          break label143;
        }
      }
    }
    double d5 = -1.0D;
    label143:
    d2 = d5 * d2;
    label150:
    double d3 = this.B / 2.0D * d1 / d2;
    if (!bool2)
    {
      if (Math.abs(d3) < this.A / 2.0D)
      {
        paramPoint2D.setLocation(A() + d3, B() + d5 * this.B / 2.0D);
        if (bool2) {
          break label315;
        }
        if (!bool1) {
          break label314;
        }
      }
      d2 = d5 * d2;
      if (bool2) {}
    }
    else if (d1 > 0.0D)
    {
      d5 = 1.0D;
      if (bool2) {
        break label270;
      }
      if (!bool1) {
        break label263;
      }
    }
    d5 = -1.0D;
    label263:
    d1 = d5 * d1;
    label270:
    double d4 = this.A / 2.0D * d2 / d1;
    paramPoint2D.setLocation(A() + d5 * this.A / 2.0D, B() + d4);
    label314:
    label315:
    return true;
  }
  
  public boolean b(double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4, Point2D paramPoint2D)
  {
    boolean bool2 = E;
    boolean bool1 = D;
    if (!bool2) {
      if (f(paramDouble1, paramDouble2))
      {
        if (!bool2)
        {
          if (!f(paramDouble3, paramDouble4)) {
            break label76;
          }
          paramPoint2D.setLocation(paramDouble3, paramDouble4);
        }
        return false;
      }
    }
    if (!bool2)
    {
      if (!f(paramDouble3, paramDouble4)) {
        paramPoint2D.setLocation(paramDouble1, paramDouble2);
      }
    }
    else {
      return false;
    }
    label76:
    double d1 = Math.sqrt((paramDouble3 - paramDouble1) * (paramDouble3 - paramDouble1) + (paramDouble4 - paramDouble2) * (paramDouble4 - paramDouble2));
    if (!bool2)
    {
      if (!Double.isNaN(d1))
      {
        if (bool2) {
          break label143;
        }
        if (!Double.isInfinite(d1)) {}
      }
      else
      {
        paramPoint2D.setLocation(paramDouble1, paramDouble2);
      }
    }
    else {
      return true;
    }
    label143:
    double d2 = (paramDouble3 - paramDouble1) / 2.0D;
    double d3 = (paramDouble4 - paramDouble2) / 2.0D;
    double d4 = paramDouble1 + d2;
    double d5 = paramDouble2 + d3;
    if (d1 > 0.1D)
    {
      d1 /= 2.0D;
      d2 /= 2.0D;
      d3 /= 2.0D;
    }
    label256:
    do
    {
      if (bool1) {
        break label274;
      }
      if (f(d4, d5))
      {
        d4 += d2;
        d5 += d3;
        if (bool2) {
          break label256;
        }
        if (!bool1) {
          break;
        }
      }
      d4 -= d2;
      d5 -= d3;
      if (!bool1) {
        break;
      }
      paramPoint2D.setLocation(d4, d5);
    } while (bool2);
    label274:
    return true;
  }
  
  public void a(Rectangle2D paramRectangle2D, byte paramByte)
  {
    if (paramByte == F()) {
      b(paramRectangle2D);
    }
  }
  
  public void b(Rectangle2D paramRectangle2D)
  {
    c(paramRectangle2D);
    d(paramRectangle2D);
    e(paramRectangle2D);
  }
  
  protected void c(Rectangle2D paramRectangle2D)
  {
    if (!E) {
      if (paramRectangle2D.getWidth() <= 0.0D)
      {
        paramRectangle2D.setFrame(this.y, this.z, this.A, this.B);
        if (!D) {
          return;
        }
      }
    }
    double d1 = Math.min(this.y, paramRectangle2D.getX());
    double d2 = Math.max(this.y + this.A, paramRectangle2D.getX() + paramRectangle2D.getWidth());
    double d3 = Math.min(this.z, paramRectangle2D.getY());
    double d4 = Math.max(this.z + this.B, paramRectangle2D.getY() + paramRectangle2D.getHeight());
    paramRectangle2D.setFrame(d1, d3, d2 - d1, d4 - d3);
  }
  
  protected void d(Rectangle2D paramRectangle2D)
  {
    boolean bool2 = E;
    boolean bool1 = D;
    do
    {
      for (int n = this.s.size() - 1; !bool1; n--)
      {
        if (n < 0) {
          break;
        }
        ((jg)this.s.get(n)).a(paramRectangle2D);
      }
    } while (bool2);
  }
  
  protected void e(Rectangle2D paramRectangle2D)
  {
    boolean bool2 = E;
    boolean bool1 = D;
    if ((bool2) || (y() > 0))
    {
      Iterator localIterator = z();
      do
      {
        if (!localIterator.hasNext()) {
          break;
        }
        ((jd)localIterator.next()).a(paramRectangle2D);
      } while (!bool1);
    }
  }
  
  public boolean b(double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4)
  {
    boolean bool = E;
    if (((bool) || (paramDouble1 + paramDouble3 >= this.y)) && ((bool) || (paramDouble1 <= this.y + this.A)) && ((bool) || (paramDouble2 + paramDouble4 >= this.z))) {
      if (bool) {}
    }
    return paramDouble2 <= this.z + this.B;
  }
  
  public boolean f(double paramDouble1, double paramDouble2)
  {
    boolean bool = E;
    if (((bool) || (paramDouble1 >= this.y)) && ((bool) || (paramDouble1 <= this.y + this.A)) && ((bool) || (paramDouble2 >= this.z))) {
      if (bool) {}
    }
    return paramDouble2 <= this.z + this.B;
  }
  
  public boolean c(double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4)
  {
    boolean bool = E;
    double d1 = A();
    double d2 = B();
    if (((bool) || (d1 <= paramDouble1 + paramDouble3)) && ((bool) || (d1 >= paramDouble1)) && ((bool) || (d2 <= paramDouble2 + paramDouble4))) {
      if (bool) {}
    }
    return d2 >= paramDouble2;
  }
  
  public z g(double paramDouble)
  {
    boolean bool2 = E;
    boolean bool1 = D;
    double d1 = A() - (int)(c() / 2.0D / paramDouble) * paramDouble;
    double d2 = B() - (int)(d() / 2.0D / paramDouble) * paramDouble;
    z localz = new z();
    Point2D.Double localDouble = new Point2D.Double();
    double d3 = d() / 10.0D;
    label89:
    if (d1 < this.y + this.A) {
      break label239;
    }
    double d4;
    label229:
    label239:
    while (bool2)
    {
      if (bool1) {
        break label342;
      }
      d4 = b() + 1.0D;
      do
      {
        do
        {
          if (d4 >= b() + d()) {
            break;
          }
          if (bool1) {
            break label229;
          }
          if (f(d1, d4))
          {
            if (bool2) {
              continue;
            }
            if (b(d1, d4, d1, d4 - d3, localDouble))
            {
              localz.add(new w(localDouble.getX(), localDouble.getY()));
              if (bool2) {
                continue;
              }
              if (!bool1) {
                break;
              }
            }
          }
          d4 += d3;
        } while (!bool1);
      } while (bool2);
      d4 = b() + d() - 1.0D;
      do
      {
        if (d4 <= b()) {
          break label315;
        }
        if (bool1) {
          break;
        }
        if (f(d1, d4))
        {
          if (bool2) {
            continue;
          }
          if (b(d1, d4, d1, d4 + d3, localDouble))
          {
            localz.add(new w(localDouble.getX(), localDouble.getY()));
            if (bool2) {
              break label326;
            }
            if (!bool1) {
              break label315;
            }
          }
        }
        d4 -= d3;
      } while (!bool1);
      d1 += paramDouble;
      if (bool2) {
        break label89;
      }
      if (!bool1) {
        break;
      }
    }
    label315:
    label326:
    label342:
    d3 = c() / 10.0D;
    label493:
    label504:
    do
    {
      do
      {
        if (d2 >= this.z + this.B) {
          break label598;
        }
        break label504;
        d4 = a() + 1.0D;
        do
        {
          do
          {
            if (d4 >= a() + c()) {
              break;
            }
            if (bool1) {
              break label493;
            }
            if (f(d4, d2))
            {
              if (bool2) {
                continue;
              }
              if (b(d4, d2, d4 - d3, d2, localDouble))
              {
                localz.add(new w(localDouble.getX(), localDouble.getY()));
                if (bool2) {
                  continue;
                }
                if (!bool1) {
                  break;
                }
              }
            }
            d4 += d3;
          } while (!bool1);
        } while (bool2);
        d4 = a() + c() - 1.0D;
        do
        {
          if (d4 <= a()) {
            break label582;
          }
          if (bool1) {
            break;
          }
          if (f(d4, d2))
          {
            if (bool2) {
              continue;
            }
            if (b(d4, d2, d4 + d3, d2, localDouble))
            {
              localz.add(new w(localDouble.getX(), localDouble.getY()));
              if (bool2) {
                break label595;
              }
              if (!bool1) {
                break label582;
              }
            }
          }
          d4 -= d3;
        } while (!bool1);
        d2 += paramDouble;
      } while (bool2);
    } while (!bool1);
    label582:
    label595:
    label598:
    localz.add(new w(A(), B()));
    return localz;
  }
  
  protected abstract void a(Graphics2D paramGraphics2D);
  
  public void b(Graphics2D paramGraphics2D)
  {
    paramGraphics2D.setColor(w);
    double d1 = this.A / 2.0D;
    double d2 = this.B / 2.0D;
    Rectangle2D.Double localDouble = hb.a().k;
    localDouble.width = (localDouble.height = 5.0D);
    localDouble.x = (this.y - 6.0D);
    localDouble.y = (this.z - 6.0D);
    paramGraphics2D.fill(localDouble);
    localDouble.y = (this.z + d2 - 2.0D);
    paramGraphics2D.fill(localDouble);
    localDouble.y = (this.z + this.B + 2.0D);
    paramGraphics2D.fill(localDouble);
    localDouble.x = (this.y + d1 - 2.0D);
    paramGraphics2D.fill(localDouble);
    localDouble.y = (this.z - 6.0D);
    paramGraphics2D.fill(localDouble);
    localDouble.x = (this.y + this.A + 2.0D);
    paramGraphics2D.fill(localDouble);
    localDouble.y = (this.z + d2 - 2.0D);
    paramGraphics2D.fill(localDouble);
    localDouble.y = (this.z + this.B + 2.0D);
    paramGraphics2D.fill(localDouble);
  }
  
  public void a(Graphics2D paramGraphics2D, byte paramByte)
  {
    if (paramByte == F()) {
      e(paramGraphics2D);
    }
  }
  
  public void b(Graphics2D paramGraphics2D, byte paramByte)
  {
    if (paramByte == F()) {
      c(paramGraphics2D);
    }
  }
  
  public void c(Graphics2D paramGraphics2D)
  {
    boolean bool = E;
    if (!bool)
    {
      if (P()) {
        return;
      }
      d(paramGraphics2D);
    }
    if (!bool) {
      if (c(paramGraphics2D, true)) {
        g(paramGraphics2D);
      }
    }
    if (a(paramGraphics2D, true)) {
      f(paramGraphics2D);
    }
  }
  
  void d(Graphics2D paramGraphics2D)
  {
    boolean bool = E;
    if (!bool) {
      if (a(this, paramGraphics2D))
      {
        paramGraphics2D.setColor(x);
        paramGraphics2D.fillRect((int)this.y, (int)this.z, (int)this.A, (int)this.B);
        if (!D) {
          break label96;
        }
      }
    }
    if (!bool) {
      if (this.l != null)
      {
        paramGraphics2D.setColor(this.l);
        paramGraphics2D.fillRect((int)this.y, (int)this.z, (int)this.A, (int)this.B);
      }
    }
    label96:
    if (this.m != null)
    {
      paramGraphics2D.setColor(this.m);
      paramGraphics2D.drawRect((int)this.y, (int)this.z, (int)this.A, (int)this.B);
    }
  }
  
  public void e(Graphics2D paramGraphics2D)
  {
    if (P()) {
      return;
    }
    Color localColor = paramGraphics2D.getColor();
    Stroke localStroke = paramGraphics2D.getStroke();
    a(paramGraphics2D);
    paramGraphics2D.setColor(localColor);
    paramGraphics2D.setStroke(localStroke);
  }
  
  boolean P()
  {
    boolean bool = E;
    if (!bool) {
      if (this.A > 0.0D)
      {
        if (bool) {
          break label42;
        }
        if (this.B > 0.0D) {
          if (bool) {
            break label42;
          }
        }
      }
    }
    label42:
    return !D();
  }
  
  public void f(Graphics2D paramGraphics2D)
  {
    boolean bool2 = E;
    boolean bool1 = D;
    do
    {
      for (int n = 0; !bool1; n++)
      {
        if (n >= this.s.size()) {
          break;
        }
        b(n).a(paramGraphics2D);
      }
    } while (bool2);
  }
  
  public void g(Graphics2D paramGraphics2D)
  {
    boolean bool2 = E;
    boolean bool1 = D;
    if ((bool2) || (y() > 0))
    {
      Iterator localIterator = z();
      do
      {
        if (!localIterator.hasNext()) {
          break;
        }
        ((jd)localIterator.next()).a(paramGraphics2D);
      } while (!bool1);
    }
  }
  
  static boolean a(ld paramld, Graphics2D paramGraphics2D)
  {
    boolean bool = E;
    if ((bool) || (paramld.H())) {
      if (bool) {}
    }
    return kg.b(paramGraphics2D);
  }
  
  static boolean a(Graphics2D paramGraphics2D, boolean paramBoolean)
  {
    boolean bool = E;
    Object localObject = paramGraphics2D.getRenderingHint(kg.g);
    if (!bool) {
      if (paramBoolean) {
        return kg.i.equals(localObject);
      }
    }
    if (!bool) {}
    return !kg.j.equals(localObject);
  }
  
  static boolean c(Graphics2D paramGraphics2D, boolean paramBoolean)
  {
    boolean bool = E;
    Object localObject = paramGraphics2D.getRenderingHint(kg.k);
    if (!bool) {
      if (paramBoolean) {
        return kg.m.equals(localObject);
      }
    }
    if (!bool) {}
    return !kg.n.equals(localObject);
  }
  
  protected void Q()
  {
    if (y() > 0)
    {
      Iterator localIterator = z();
      while (localIterator.hasNext()) {
        ((jd)localIterator.next()).i();
      }
    }
  }
  
  public void R()
  {
    if (this.C == null) {
      return;
    }
    tb localtb;
    for (d locald = this.C.i(); locald != null; locald = locald.j())
    {
      localtb = ((e)locald).n;
      if (localtb != null) {
        localtb.Q();
      }
    }
    for (locald = this.C.h(); locald != null; locald = locald.i())
    {
      localtb = ((e)locald).n;
      if (localtb != null) {
        localtb.Q();
      }
    }
  }
  
  public void a(ObjectOutputStream paramObjectOutputStream)
    throws IOException
  {
    boolean bool2 = E;
    boolean bool1 = D;
    paramObjectOutputStream.writeByte(4);
    paramObjectOutputStream.writeInt(x());
    int n = 0;
    if (n < x())
    {
      b(n).a(paramObjectOutputStream);
      n++;
    }
    for (;;)
    {
      if ((bool2) || (!bool1))
      {
        if (!bool1) {
          break;
        }
        paramObjectOutputStream.writeObject(this.l);
        paramObjectOutputStream.writeObject(this.m);
        paramObjectOutputStream.writeObject(this.k);
        paramObjectOutputStream.writeFloat((float)this.A);
        paramObjectOutputStream.writeFloat((float)this.B);
        paramObjectOutputStream.writeFloat((float)this.y);
        paramObjectOutputStream.writeFloat((float)this.z);
        paramObjectOutputStream.writeBoolean(this.p);
        c.a(paramObjectOutputStream, this.o);
        if (!bool2) {
          paramObjectOutputStream.writeBoolean(D());
        }
      }
    }
  }
  
  public void a(ObjectInputStream paramObjectInputStream)
    throws IOException, ClassNotFoundException
  {
    boolean bool2 = E;
    boolean bool1 = D;
    if (!bool2) {}
    int n;
    int i1;
    jg localjg2;
    label202:
    label204:
    label354:
    label356:
    jg localjg1;
    switch (paramObjectInputStream.readByte())
    {
    case 4: 
      n = paramObjectInputStream.readInt();
      this.s = new ArrayList(n);
      i1 = 0;
      do
      {
        if (i1 >= n) {
          break;
        }
        localjg2 = v();
        b(localjg2);
        localjg2.a(paramObjectInputStream);
        i1++;
        if (bool2) {
          break label204;
        }
        if (bool1) {
          break label202;
        }
      } while (!bool1);
      this.l = ((Color)paramObjectInputStream.readObject());
      this.m = ((Color)paramObjectInputStream.readObject());
      this.k = ((Color)paramObjectInputStream.readObject());
      b(paramObjectInputStream.readFloat(), paramObjectInputStream.readFloat());
      a(paramObjectInputStream.readFloat(), paramObjectInputStream.readFloat());
      this.p = paramObjectInputStream.readBoolean();
      this.o = c.a(paramObjectInputStream);
      if (bool2) {
        break label759;
      }
      this.r = paramObjectInputStream.readBoolean();
      if (!bool2) {
        if (!bool1) {
          break label757;
        }
      }
    case 3: 
      n = paramObjectInputStream.readInt();
      this.s = new ArrayList(n);
      i1 = 0;
      do
      {
        if (i1 >= n) {
          break;
        }
        localjg2 = v();
        b(localjg2);
        localjg2.a(paramObjectInputStream);
        i1++;
        if (bool2) {
          break label356;
        }
        if (bool1) {
          break label354;
        }
      } while (!bool1);
      this.l = ((Color)paramObjectInputStream.readObject());
      this.m = ((Color)paramObjectInputStream.readObject());
      this.k = ((Color)paramObjectInputStream.readObject());
      b(paramObjectInputStream.readFloat(), paramObjectInputStream.readFloat());
      a(paramObjectInputStream.readFloat(), paramObjectInputStream.readFloat());
      this.p = paramObjectInputStream.readBoolean();
      if (!bool2)
      {
        this.o = c.a(paramObjectInputStream);
        if (!bool2) {
          if (!bool1) {
            break label757;
          }
        }
      }
    case 2: 
      n = paramObjectInputStream.readInt();
      this.s = new ArrayList(n);
      i1 = 0;
      do
      {
        if (i1 >= n) {
          break;
        }
        localjg2 = v();
        b(localjg2);
        localjg2.a(paramObjectInputStream);
        i1++;
        if (bool2) {
          break label515;
        }
        if (bool1) {
          break label513;
        }
      } while (!bool1);
      this.l = ((Color)paramObjectInputStream.readObject());
      this.m = ((Color)paramObjectInputStream.readObject());
      this.k = ((Color)paramObjectInputStream.readObject());
      b(paramObjectInputStream.readFloat(), paramObjectInputStream.readFloat());
      a(paramObjectInputStream.readFloat(), paramObjectInputStream.readFloat());
      this.p = paramObjectInputStream.readBoolean();
      if (bool2) {
        break label759;
      }
      this.o = c.a(paramObjectInputStream.readByte(), paramObjectInputStream.readByte());
      if (!bool1) {
        break label757;
      }
    case 1: 
      this.s = new ArrayList(1);
      localjg1 = v();
      localjg1.a(paramObjectInputStream);
      a(localjg1);
      this.l = ((Color)paramObjectInputStream.readObject());
      this.m = ((Color)paramObjectInputStream.readObject());
      this.k = ((Color)paramObjectInputStream.readObject());
      b(paramObjectInputStream.readFloat(), paramObjectInputStream.readFloat());
      a(paramObjectInputStream.readFloat(), paramObjectInputStream.readFloat());
      this.p = paramObjectInputStream.readBoolean();
      this.o = c.a(paramObjectInputStream.readByte(), paramObjectInputStream.readByte());
      if (bool2) {
        return;
      }
      if (!bool1) {
        break label757;
      }
    case 0: 
      label513:
      label515:
      this.s = new ArrayList(1);
      localjg1 = v();
      localjg1.a(paramObjectInputStream);
      a(localjg1);
      this.l = ((Color)paramObjectInputStream.readObject());
      this.m = ((Color)paramObjectInputStream.readObject());
      b(paramObjectInputStream.readFloat(), paramObjectInputStream.readFloat());
      a(paramObjectInputStream.readFloat(), paramObjectInputStream.readFloat());
      this.p = paramObjectInputStream.readBoolean();
      this.o = c.a(paramObjectInputStream.readByte(), paramObjectInputStream.readByte());
      if (bool2) {
        return;
      }
      if (!bool1) {
        break label757;
      }
    }
    throw new a.e.c();
    label757:
    label759:
    this.v = 0;
  }
  
  void a(a.c.e parame)
  {
    this.C = parame;
    Q();
    R();
  }
  
  g S()
  {
    if (this.C != null) {
      return (g)this.C.g();
    }
    return null;
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.j.ld

 * JD-Core Version:    0.7.0.1

 */